from scipy import signal
import matplotlib.pyplot as plt

if __name__ == "__main__":
    A = [21.02379604, 21.40093456, 20.51828453, 20.80865205, 21.26029163, 20.59126028,
         21.02379604, 21.02379604, 20.88061302, 20.09975124, 21.02379604, 20.88061302,
         20.51828453, 20.59126028, 20.80865205, 21.26029163, 21.21320344, 21.58703314,
         21.09502311, 20.59126028, 21.37755833, 20.80865205, 21.1896201, 21.9317122,
         21.47091055, 21.09502311, 21.1896201, 21.84032967, 21.9317122, 22.,
         21.9317122, 21.40093456, 21.47091055, 22.8035085, 21.9317122, 21.1896201,
         22.02271555, 21.9317122, 22.09072203, 21.84032967, 22.13594362, 21.9317122,
         21.47091055, 21.02379604, 22.13594362, 22.20360331, 22.36067977, 21.1896201,
         21.40093456, 21.58703314, 20.61552813, 21.58703314, 22.6715681, 22.8035085,
         22.20360331, 21.54065923, 21.9317122, 22.20360331, 21.1896201, 21.9317122,
         22.627417, 22.6715681, 22.56102835, 22.02271555, 21.9317122, 22.09072203,
         21.54065923, 22.02271555, 22.09072203, 21.58703314, 21.21320344, 22.20360331,
         21.47091055, 22.20360331, 23.34523506, 21.47091055, 22., 22.82542442,
         22.36067977, 23.53720459, 21.09502311, 22.47220505, 22.47220505, 22.13594362,
         22.13594362, 22.20360331, 21.9317122, 22.02271555, 23.02172887, 22.36067977,
         22.8035085, 22.36067977, 22.82542442, 23.34523506, 22.56102835, 22.47220505,
         22., 23.85372088, 22., 23.02172887, 22.6715681, 23.08679276,
         22.56102835, 22.56102835, 22.82542442, 22.36067977, 22.02271555, 22.82542442,
         22.627417, 23.34523506, 23.02172887, 22.6715681, 22.8035085, 22.47220505,
         23.76972865, 21.9544984, 23.02172887, 22.82542442, 24.08318916, 23.60084744,
         24.08318916, 22.8035085, 24., 23.19482701, 24.18677324, 26.40075756,
         24.8394847, 25.05992817, 23.34523506, 26.2488095, 25.49509757, 27.29468813,
         26.92582404, 27.73084925, 26., 25.61249695, 25.94224354, 23.08679276,
         23.32380758, 23.60084744, 23.02172887, 22.36067977, 20.88061302, 18.43908891,
         21.09502311, 22.09072203, 19.31320792, 16., 16.64331698, 14.86606875,
         15.03329638, 14.2126704, 15.13274595, 18.24828759, 16.64331698, 17.2626765,
         15.65247584, 17.11724277, 17.02938637, 17.08800749, 19.92485885, 18.86796226,
         17.72004515, 19.10497317, 19.72308292, 19.72308292, 17.08800749, 17.02938637,
         15.62049935, 16.97056275, 17.20465053, 18.97366596, 19.41648784, 20.61552813,
         21.02379604, 23.08679276, 21.84032967, 18.02775638, 17.2626765, 16.2788206,
         15., 13.92838828, 15.5241747, 17.11724277, 16.4924225, 17.2626765,
         17.02938637, 18.43908891, 18.68154169, 21.26029163, 22.82542442, 24.0208243,
         26.07680962, 22.84731932, 27.80287755, 23.34523506, 22.20360331, 22.02271555,
         21.37755833, 21.9544984]
    [b, a] = signal.butter(3, 0.9, 'high')
    sf = signal.filtfilt(b, a, A)
    print(A)
    print(sf)
